package com.hb.core.pojo.center.sys.entity;

import com.hb.core.pojo.parent.MPCommonEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 字典类型表
 * </p>
 *
 * @author zjk
 * @since 2021-05-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_dic_type")
@ApiModel(value = "DicType对象", description = "字典类型表")
public class DicType extends MPCommonEntity {

    @ApiModelProperty(value = "类型名称")
    private String typeName;

    @ApiModelProperty(value = "类型代码")
    private String typeCode;

    @ApiModelProperty(value = "备注")
    private String note;

    /**
     * 参数验证方法
     * 所有的继承该类的DTO对象必须在调用时重写该方法
     * 该方法中验证的字段对应数据库中不能为空的字段
     *
     * @param fieldNames
     * @return
     */
    @Override
    public String paramsValid(String... fieldNames) {
        return super.paramsValid("typeName");
    }

}
